package leetcode;

public class Proxyer {
	public static void main(String[] args){
		FlowerKeeper boy = new Proxy();
		boy.sendFlower();
	}
}

interface FlowerKeeper{
	public void sendFlower();
}

class Boy implements FlowerKeeper{
	private String flowerName;
	Boy(String flower){
		this.flowerName = flower;
	}
	@Override
	public void sendFlower() {
		System.out.println("I give you this flower "+this.flowerName);
	}
}

class Proxy implements FlowerKeeper{
	private FlowerKeeper flowerKeeper = null;
	Proxy(){
		if(flowerKeeper==null)
			flowerKeeper = new Boy("郁金香");
	}
	@Override
	public void sendFlower() {
		System.out.println("The Boy said: ");
		flowerKeeper.sendFlower();
	}
	
}